package com.ck.exception.bean;

/**
 * @Classname ResultCode
 * @Description 返回结果枚举
 * @Date 2021/7/13 19:53
 * @Created by lpc
 */
public enum ResultCode {

    SUCCESS(200, "请求成功"),
    SYS_ERR(-1, "系统异常，请联系管理员"),
    SIGN_ERR(401, "认证失败"),
    AUTH_ERR(403, "权限错误"),
    NOT_FOUND_ERR(404, "找不到资源"),
    SERVER_ERR(500, "服务器错误"),
    NULL_ERR(-2, "空对象错误"),
    PARAM_ERR(-3, "参数错误"),
    FILE_ERR(600, "文件异常");

    private Integer code;
    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return this.code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
